package com.sgave.blog.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author fly
 * @date 2024/1/9 16:39
 */
@Data
public class Blog {

    /**
     * 博客id
     */
    @ApiModelProperty(value = "id")
    private Integer id;

    /**
     * 博客标题
     */
    @ApiModelProperty(value = "标题")
    private String title;

    /**
     * 博客作者
     */
    @ApiModelProperty(value = "作者")
    private String author;

    /**
     * 博客内容
     */
    @ApiModelProperty(value = "内容")
    private String content;

    /**
     * 关联博客标签id
     */
    @ApiModelProperty(value = "标签id")
    private Integer label;

    @ApiModelProperty(value = "博客阅读量")
    private Integer readCount;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date createTime;

}
